async function getMajor(collegeId) {
	var [err, res] = await uni.request({
		url: 'http://211.82.48.36/student/teachingResources/gradeAndClassCurriculum/subjectJson?departmentNum=' +
			collegeId
	});

	if (err) return null

	if (res.data.indexOf("登录") != -1) return null

	console.log(res)

	let resultArr0 = ['未选择'];
	let resultArr1 = [0];

	let content = res.data

	for (let i = 0; i < content.length; i++) {
		let value = content[i]
		let name = value['subjectName'];
		let code = value['subjectCode'];
		resultArr0.push(name);
		resultArr1.push(code);
	}

	return {
		major: resultArr0,
		majorIdArr: resultArr1
	}
}

export {
	getMajor
}
